//
//  QuestionTableViewCell.m
//  XiangMuB
//
//  Created by 向修根 on 16/8/12.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "QuestionTableViewCell.h"
#import "QuestionModel.h"
#import <UIImageView+WebCache.h>

@implementation QuestionTableViewCell







- (void)layoutSubviews{
    [super layoutSubviews];
    NSString *str = self.model.title;
    self.name.text = [self.model.name stringByAppendingString:str];
    self.alias.text = self.model.alias;
    self.classification.text = self.model.classification;
    NSString *str1 = [NSString stringWithFormat:@"%@",self.model.concernCount];
    self.concernCount.text = [str1 stringByAppendingString:@"关注"];
    
    NSString *str2 = [NSString stringWithFormat:@"%@",self.model.questionCount];
    self.questionCount.text = [str2 stringByAppendingString:@"提问"];
    
    [self.headpicurl sd_setImageWithURL:[NSURL URLWithString:self.model.headpicurl] placeholderImage:nil];
    
    [self.picurl sd_setImageWithURL:[NSURL URLWithString:self.model.picurl] placeholderImage:nil];
    
//    弧度
    self.cellView.layer.cornerRadius = self.cellView.frame.size.width /50;
    self.cellView.layer.masksToBounds = YES;
   [ self.cellView NightWithType:UIViewColorTypeNormal];
//   cell边框
    self.cellView.layer.borderWidth = 2;
    self.cellView.layer.borderColor = [[UIColor colorWithRed:192.0f/255.0f  green:192.0f/255.0f  blue:192.0f/255.0f  alpha:0.7]CGColor];
    
//    button弧度
    self.FocusButton.layer.cornerRadius = self.FocusButton.frame.size.width/ 10;
    self.FocusButton.layer.masksToBounds = YES;
    self.headpicurl.layer.cornerRadius = self.headpicurl.frame.size.width / 2;
    self.headpicurl.layer.masksToBounds = YES;
    
}


- (void)awakeFromNib {
    [self.name NightWithType:UIViewColorTypeClear];
    [self.alias NightWithType:UIViewColorTypeClear];

    [self.classification NightWithType:UIViewColorTypeClear];

    [self.concernCount NightWithType:UIViewColorTypeClear];

    [self.questionCount NightWithType:UIViewColorTypeClear];
    [self.FocusButton NightWithType:UIViewColorTypeClear];



}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
